﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;

namespace PlaylistGenEngine.UTIL
{
    public static class SoundInfo
    {
        /*
        [DllImport("winmm.dll")]
        private static extern uint mciSendString(
            String command,
            StringBuilder returnValue,
            int returnLength,
            IntPtr winHandle);

        public static int getSoundLength(String fileName)
        {

            StringBuilder lengthBuf = new StringBuilder(32);

            mciSendString(String.Format("open \"{0}\" type waveaudio alias wave", fileName), null, 0, IntPtr.Zero);
            mciSendString("status wave length", lengthBuf, lengthBuf.Capacity, IntPtr.Zero);
            mciSendString("close wave", null, 0, IntPtr.Zero);

            int length = 0;
            int.TryParse(lengthBuf.ToString(), out length);

            return length;

        }
        */
    }

}
